home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Leser 19
/
Amiga Plus Leser CD 19.iso
/
Online
/
AmigaTalk
/
intuition
/
IDCMPFlags.st
< prev
next >
Wrap
Text File
|
2002-03-17
|
4KB
|
99 lines
" -------------------------------------------------------------------- "
" IDCMPFlags Class is a Singleton class that allows the user to "
" reference IDCMP Flags without having to remember their actual "
" hexadecimal values. This Class is instantiated by the Intuition "
" class. "
""
" The User does NOT need to create one of these, since Intuition Class "
" will instantiate the only needed instance of this Class. See the "
" SetupIntuition.st source file for the method(s) that help the User "
" with this Class. "
""
" EXAMPLE: 'myTag <- intuition getIDCMPFlag: #IDCMP_SIZEVERIFY' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" -------------------------------------------------------------------- "
Class IDCMPFlags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self at: #IDCMP_SIZEVERIFY put: 1.
self at: #IDCMP_NEWSIZE put: 2.
self at: #IDCMP_REFRESHWINDOW put: 4.
self at: #IDCMP_MOUSEBUTTONS put: 8.
self at: #IDCMP_MOUSEMOVE put: 16r10.
self at: #IDCMP_GADGETDOWN put: 16r20.
self at: #IDCMP_GADGETUP put: 16r40.
self at: #IDCMP_REQSET put: 16r80.
self at: #IDCMP_MENUPICK put: 16r100.
self at: #IDCMP_CLOSEWINDOW put: 16r200.
self at: #IDCMP_RAWKEY put: 16r400.
self at: #IDCMP_REQVERIFY put: 16r800.
self at: #IDCMP_REQCLEAR put: 16r1000.
self at: #IDCMP_MENUVERIFY put: 16r2000.
self at: #IDCMP_NEWPREFS put: 16r4000.
self at: #IDCMP_DISKINSERTED put: 16r8000.
self at: #IDCMP_DISKREMOVED put: 16r10000.
"16r20000 is for System use only"
self at: #IDCMP_ACTIVEWINDOW put: 16r40000.
self at: #IDCMP_INACTIVEWINDOW put: 16r80000.
self at: #IDCMP_DELTAMOVE put: 16r100000.
self at: #IDCMP_VANILLAKEY put: 16r200000.
self at: #IDCMP_INTUITICKS put: 16r400000.
self at: #IDCMP_IDCMPUPDATE put: 16r800000.
self at: #IDCMP_MENUHELP put: 16r1000000.
self at: #IDCMP_CHANGEWINDOW put: 16r2000000.
self at: #IDCMP_GADGETHELP put: 16r4000000.
" GadTools use these flag summations for different
* types of GadTools:
"
self at: #ARROWIDCMP put: 16r400068.
self at: #BUTTONIDCMP put: 16r40. "IDCMP_GADGETUP"
self at: #CHECKBOXIDCMP put: 16r40.
self at: #INTEGERIDCMP put: 16r40.
self at: #LISTVIEWIDCMP put: 16r400078.
self at: #MXIDCMP put: 16r20. "IDCMP_GADGETDOWN"
self at: #NUMBERIDCMP put: 0.
self at: #CYCLEIDCMP put: 16r40.
self at: #PALETTEIDCMP put: 16r40.
self at: #ARROWSCROLLIDCMP put: 16r400078.
" Use ARROWIDCMP | SCROLLERIDCMP if your scrollers have arrows,
* or use my #ARROWSCROLLIDCMP value above:
"
self at: #SCROLLERIDCMP put: 16r70.
self at: #SLIDERIDCMP put: 16r70.
self at: #STRINGIDCMP put: 16r40. "IDCMP_GADGETUP"
self at: #TEXTIDCMP put: 0.
].
^ self "uniqueInstance??"
]